<template>
	<div>
		<div class="recommend-title">热销推荐</div>
		<ul>
			<!--<li class="item border-bottom" v-for="item of recommendList">-->
			<router-link 
				class="item border-bottom" 
				v-for="item of list" tag="li" 
				:to="'/detail/' + item.id"
			>
				<!--<div class="item-img-wrapper">-->
					<img class="item-img" :src="item.imgUrl"/>
				<!--</div>-->
				<div class="item-info">
					<p class="item-title">{{item.title}}</p>
					<p class="item-desc">{{item.desc}}</p>
					<button class="item-button">查看详情</button>
				</div>
			</router-link>
		</ul>
	</div>
</template>

<script>
	export default {
		name: "HomeRecommend",
		
		props: {
			list: Array
		},
		
		data () {
			return {
/*				recommendList: [
					{
						id: "recommend00000",
						imgUrl: "http://img1.qunarzz.com/sight/p0/201405/30/12fe8029b9653021dca80636859a5ac7.jpg_200x200_b54f5aca.jpg",
						title: "世界恐龙谷",
						desc: "云南省楚雄彝族自治州禄丰县世界恐龙谷风景旅游区"
					},
					{
						id: "recommend00001",
						imgUrl: "http://img1.qunarzz.com/sight/p0/1505/59/5955093b27545e7d.water.jpg_200x200_386f271d.jpg",
						title: "元谋土林",
						desc: "云南省楚雄市元谋县物茂乡土林街1号"
					},
					{
						id: "recommend00002",
						imgUrl: "http://img1.qunarzz.com/sight/p0/1505/b5/b51e06e4a7f93ff3.water.jpg_200x200_4e89ff31.jpg",
						title: "武定狮子山",
						desc: "狮子山景区位于武定县城西3km（公路10公里），主峰海拔2452m，以形似伏卧的雄狮而得名。这里自然风光秀甲滇中，佛教文化底蕴深厚，牡丹花园云南独有。狮子山古树凌霄，林海蔽日，巉崖峥嵘，怪石嶙峋，山花浪漫，鸟语蝉鸣，是返璞归真、回归自然的佳境。系云南省重点风景名胜区，2009年被评为国家AAAA级旅游景区。"
					},
//					{
//						id: "recommend00003",
//						imgUrl: "http://img1.qunarzz.com/sight/p0/1803/d7/d79a6dc8ffd08d7ca3.img.jpg_200x200_e04f3af1.jpg",
//						title: "南华德茂庄园森林温泉",
//						desc: "云南省楚雄州南华县曹家冲（民族中学背后）"
//					},
//					{
//						id: "recommend00004",
//						imgUrl: "http://img1.qunarzz.com/sight/p0/201403/12/0c1b564f8852cc00307483888934b0a5.jpg_200x200_ca931b88.jpg",
//						title: "黑井古镇",
//						desc: "云南省楚雄州元谋县龙川江畔黑井古镇"
//					},
//					{
//						id: "recommend00005",
//						imgUrl: "http://img1.qunarzz.com/sight/p0/1709/83/8334e0821542ec66a3.img.jpg_200x200_11fd07d0.jpg",
//						title: "禄丰长龙温泉水乐园",
//						desc: "云南省楚雄市禄丰县侏罗纪大街恐龙环岛景区禄丰长龙温泉水乐园售票处"
//					},
				]*/
			}
		}
	}
</script>

<style lang="stylus" scoped>
	@import '~@/assets/styles/mixins.styl'
	.recommend-title
		margin-top: .2rem
		line-height: .8rem
		text-indent: .2rem
	.item
		display: flex
		height: 1.9rem
		overflow: hidden
		.item-img
			width: 1.7rem
			height: 1.7rem
			padding: .1rem
		.item-info	
			flex: 1
			padding: .1rem
			min-width: 0
		.item-title
			line-height: .54rem
			font-size: .32rem
			ellipsis()
		.item-desc
			line-height: .4rem
			color: #ccc
			/*width: 85%*/
			ellipsis()
		.item-button
			line-height: .44rem
			margin-top: .16rem
			background: #ff9300
			padding: 0 .2rem
			border-radius: .09rem
			color: #fff
</style>